package com.yuda.campsite.service.impl;

import com.yuda.campsite.domain.InvitationCodeClassification;
import com.yuda.campsite.mapper.InvitationCodeClassificationMapper;
import com.yuda.campsite.service.IInvitationCodeClassificationService;
import com.yuda.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author wyn
 * @date 2021-09-29
 */
@Service
public class InvitationCodeClassificationServiceImpl implements IInvitationCodeClassificationService
{
    @Autowired
    private InvitationCodeClassificationMapper invitationCodeClassificationMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public InvitationCodeClassification selectInvitationCodeClassificationById(Long id)
    {
        return invitationCodeClassificationMapper.selectInvitationCodeClassificationById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param invitationCodeClassification 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<InvitationCodeClassification> selectInvitationCodeClassificationList(InvitationCodeClassification invitationCodeClassification)
    {
        return invitationCodeClassificationMapper.selectInvitationCodeClassificationList(invitationCodeClassification);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param invitationCodeClassification 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertInvitationCodeClassification(InvitationCodeClassification invitationCodeClassification)
    {
        invitationCodeClassification.setCreateTime(DateUtils.getNowDate());
        return invitationCodeClassificationMapper.insertInvitationCodeClassification(invitationCodeClassification);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param invitationCodeClassification 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateInvitationCodeClassification(InvitationCodeClassification invitationCodeClassification)
    {
        return invitationCodeClassificationMapper.updateInvitationCodeClassification(invitationCodeClassification);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteInvitationCodeClassificationByIds(Long[] ids)
    {
        return invitationCodeClassificationMapper.deleteInvitationCodeClassificationByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteInvitationCodeClassificationById(Long id)
    {
        return invitationCodeClassificationMapper.deleteInvitationCodeClassificationById(id);
    }
}
